package com.tang.excel.oci.mapper;

import com.tang.excel.oci.domain.WarmWater;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Tang
 * @classname WarmWaterMapper
 * @description [  ]
 * @date 2021/5/20 15:49
 */
public interface WarmWaterMapper {

    @Insert(value = {
            "<script>",
            "insert into warm_water values ",
            "<foreach item = 'item' collection = 'warmWaters' separator = ','>",
            "(null ,#{item.name},#{item.codValue},#{item.saveDate} )",
            "</foreach>",
            "</script>"
    })
    void batchInsert(@Param("warmWaters") List<WarmWater> warmWaters);

}